<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8"/>
	<meta name="keywords" content="encoding, text encoding"/>
	<link rel="stylesheet" href="../../Shared/sty/standard.css"/>
	<script defer src="../../Shared/js/toc.js"></script>
	
	<title>Change a document’s text encoding in CotEditor on Mac</title>
</head>

<body>
<a name="howto_change_encoding"></a>

<h1>Change a document’s text encoding in CotEditor on Mac</h1>

<p>CotEditor lets you change the text encoding used when saving a document.</p>


<section>
<h2>Change the default text encoding</h2>

<p>To change the text encoding used for new documents you create in CotEditor, or when opening an empty document do the following:</p>

<ol>
	<li><p>Go to the CotEditor app <img class="appicon" srcset="../../Shared/gfx/icon_32x32@2x.png 2x" alt=""/> on your Mac.</p></li>
	<li><p>Choose CotEditor &gt; Settings, then click the <a href="settings_format.html">Format settings</a>.</p></li>
	<li><p>Change the “Default text encoding” option.</p></li>
</ol>
</section>


<section>
<h2>Change a document’s text encoding</h2>

<ol>
	<li><p>In the CotEditor app <img class="appicon" srcset="../../Shared/gfx/icon_32x32@2x.png 2x" alt=""/> on your Mac, open a document.</p></li>
	<li><p>Click the Encoding button in the status bar, or choose Format &gt; Text Encoding.</p></li>
	<li><p>From the list, select the encoding you want to use.</p></li>
</ol>

<p>If the document has never been saved, the encoding you selected is immediately applied.</p>

<p>When you change the encoding of a saved document, a dialog appears.</p>

<figure>
	<img srcset="../gfx/encodingWindow@2x.png 2x" alt="Screenshot of the “Change Text Encoding” dialog"/>
</figure>

<p>The options in the dialog are as follows:</p>
<table>
	<thead>
		<tr><th>Option</th><th>Description</th></tr>
	</thead>
	<tbody>
		<tr>
			<th>Convert</th>
			<td>Keeps the current text and changes the document so that it’s saved using the selected encoding.</td>
		</tr>
		<tr>
			<th>Reinterpret</th>
			<td>Reopens the document using the specified encoding. For more information, see <a href="howto_interpret_encoding.html">Open a document with a specified encoding</a>.</td>
		</tr>
		<tr>
			<th>Cancel</th>
			<td>Cancels the operation. The document is not changed.</td>
		</tr>
	</tbody>
</table>

<p>To change the document’s text encoding, click Convert.</p>


<h3>If the document contains incompatible characters</h3>

<p>If the document contains characters that can’t be represented in the text encoding you’re changing to, a warning dialog appears.</p>

<p>To continue with the change, click Change Encoding. The Warnings inspector opens, then you can see a list of characters that are incompatible with the new encoding. For more information, see <a href="howto_inspect_usedchar.html">Find characters incompatible with the document encoding</a>.</p>


<h23>If you don’t see the encoding you want in the Text Encoding menu</h3>

<p>If you don’t see the encoding you want in the Text Encoding menu, you may be able to customize the list and add the encoding you need.</p>
<p>The encodings that appear in the Text Encoding menu can be changed in <a href="settings_format.html">Format settings</a> under “Encoding priorities.” For more information, see <a href="howto_customize_encoding_order.html">Change the priority of text encodings</a>.</p>
</section>


<section id="cf">
<h2>See also</h2>
<ul>
	<li><a href="howto_interpret_encoding.html">Open a document with a specified encoding in CotEditor on Mac</a></li>
	<li><a href="howto_inspect_usedchar.html">Find characters incompatible with the document encoding in CotEditor on Mac</a></li>
	<li><a href="howto_customize_encoding_order.html">Change the priority of text encodings in CotEditor on Mac</a></li>
</ul>
</section>

</body>
</html>
